from pathlib import Path  
  
folder_path = Path(r'C:\Users\王相辰\Desktop\调试代码用的文档')  
  
  
for file in folder_path.glob('*.doc'):    
    stem = file.stem    
    new_name = f'DOC_{stem}.doc'  
    new_file_path = file.parent / new_name   
    file.rename(new_file_path)  
    print(f'Renamed "{file}" to "{new_file_path}"')